268 ◾ Bioinformatics
number. QIIME2 can use that information in the file name to automate importing the files
and to create an artifact for that demultiplexed raw data. The following are the commands
for importing Casava 1.8 formatted demultiplexed, single-end and paired-end FASTQ
files, respectively:
qiime tools import \
--type ‘SampleData[SequencesWithQuality]’ \
--input-path data \
--input-format CasavaOneEightSingleLanePerSampleDirFmt \
--output-path artifacts/demultiplexed-single-end.qza
qiime tools import \
--type ‘SampleData[PairedEndSequencesWithQuality]’ \
--input-path data \
--input-format CasavaOneEightSingleLanePerSampleDirFmt \
--output-path artifacts/demultiplexed-paired-end.qza
These commands create artifacts for demultiplexed data that are ready for processing (the
samples are already separated).
7.3.1.1.5 Non-Casava Demultiplexed FASTQ
When the reads of each sample are in a separate FASTQ file for single-end reads or in two
FASTQ files for the paired-end reads, these demultiplexed files are non-Casava 1.8 demul-
tiplexed FASTQ files. Those are the most commonly used files. In our worked example,
we will practice in files with this format. Since the analysis of metagenomic data involves
multiple samples, QIIME2 will need to know the sample identification when multiple
FASTQ files for individual samples are used in the analysis. Thus, importing the non-
Casava 1.8 demultiplexed FASTQ files requires an additional text file that maps sample
identifiers to the FASTQ files. This file is called the manifest file and it will be created
by the user. A manifest file is a comma-separated value (CSV) file with three columns
with these column headers: “sample-id”, “absolute-filepath”, and “direction”. The headers
are self-explanatory; the sample-id column includes the sample IDs, the absolute-filepath
includes the absolute bath for a FASTQ file, and the direction column shows the direction
of the FASTQ file (forward or reverse). Figure 7.2 shows example manifest files for single-
end FASTQ files (on the left) and paired-end FASTQ files (on the right).
When you have multiple FASTQ files, each file (or two files) for an individual sample,
you will need to create a manifest file for importing those FASTQ files into QIIME2 arti-
fact. The single-end FASTQ files and paired-end FASTQ files are imported, respectively,
as follows:
qiime tools import \
--type ‘SampleData[SequencesWithQuality]’ \
--input-format SingleEndFastqManifestPhred33 \
--input-path data \
--output-path artifacts/xxxx.qza